import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
import {JVxeTypes,JVxeColumn} from '/@/components/jeecg/JVxeTable/types'
import { getWeekMonthQuarterYear } from '/@/utils';
//列表数据
export const columns: BasicColumn[] = [
   {
    title: '头像',
    align:"center",
    dataIndex: 'avatar',
    customRender:render.renderImage,
   },
   {
    title: '登录账号',
    align:"center",
    dataIndex: 'account'
   },
   {
    title: '护理员',
    align:"center",
    dataIndex: 'caregiver_dictText'
   },
   {
    title: '专家姓名',
    align:"center",
    dataIndex: 'expertName'
   },
   {
    title: ' 会员类型',
    align:"center",
    dataIndex: 'membershipType_dictText'
   },
   {
    title: '会员状态',
    align:"center",
    dataIndex: 'memberStatus_dictText'
   },
   {
    title: '会员姓名',
    align:"center",
    dataIndex: 'memberName'
   },
   {
    title: '会员昵称',
    align:"center",
    dataIndex: 'memberNickname'
   },
   {
    title: '身份证号',
    align:"center",
    dataIndex: 'idNumber'
   },
   {
    title: '手机号码',
    align:"center",
    dataIndex: 'phone'
   },
   {
    title: '会员性别',
    align:"center",
    dataIndex: 'memberGender_dictText'
   },
   {
    title: '电子邮箱',
    align:"center",
    dataIndex: 'email'
   },
   {
    title: '省市区',
    align:"center",
    dataIndex: 'region',
   },
   {
    title: '详细地址',
    align:"center",
    dataIndex: 'address'
   },
   {
    title: '身份标签',
    align:"center",
    dataIndex: 'identityLabel_dictText'
   },
   {
    title: '备注',
    align:"center",
    dataIndex: 'remarks'
   },
   {
    title: '民族',
    align:"center",
    dataIndex: 'nation'
   },
   {
    title: ' 籍贯',
    align:"center",
    dataIndex: 'placeOfOrigin'
   },
   {
    title: '政治面貌',
    align:"center",
    dataIndex: 'politicalStatus_dictText'
   },
   {
    title: '文化程度',
    align:"center",
    dataIndex: 'educationalLevel_dictText'
   },
   {
    title: '人员类别',
    align:"center",
    dataIndex: 'personnelCategory_dictText'
   },
   {
    title: '婚姻状况',
    align:"center",
    dataIndex: 'maritalStatus_dictText'
   },
   {
    title: '居住状况',
    align:"center",
    dataIndex: 'residentialStatus_dictText'
   },
   {
    title: '经济来源',
    align:"center",
    dataIndex: 'sourceOfIncome_dictText'
   },
   {
    title: '原单位',
    align:"center",
    dataIndex: 'oldUnit'
   },
   {
    title: ' 职称',
    align:"center",
    dataIndex: 'professionalTitle'
   },
   {
    title: '月收入',
    align:"center",
    dataIndex: 'monthlyIncome'
   },
   {
    title: ' 宗教信仰',
    align:"center",
    dataIndex: 'religiousBelief_dictText'
   },
   {
    title: '户籍所在地',
    align:"center",
    dataIndex: 'registeredResidence',
   },
   {
    title: '户籍类型',
    align:"center",
    dataIndex: 'householdType_dictText'
   },
   {
    title: '户籍详细地址',
    align:"center",
    dataIndex: 'householdAddress'
   },
   {
    title: '居住详细地址',
    align:"center",
    dataIndex: 'residentialDetailedAddress'
   },
   {
    title: '社保号',
    align:"center",
    dataIndex: 'socialSecurityNumber'
   },
   {
    title: '医疗保障',
    align:"center",
    dataIndex: 'medicalSecurity'
   },
   {
    title: '血型',
    align:"center",
    dataIndex: 'bloodType_dictText'
   },
   {
    title: '慢性病',
    align:"center",
    dataIndex: 'chronicDisease'
   },
   {
    title: '失能情况',
    align:"center",
    dataIndex: 'disabilitySituation_dictText'
   },
   {
    title: '服务类型',
    align:"center",
    dataIndex: 'serviceType_dictText'
   },
];

//子表表格配置
export const ecEmergencyContactColumns: JVxeColumn[] = [
    {
      title: ' 姓名',
      key: 'name',
      type: JVxeTypes.input,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: '关系',
      key: 'relationship',
      type: JVxeTypes.input,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: '手机号',
      key: 'phone',
      type: JVxeTypes.input,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: '地址',
      key: 'region',
      type: JVxeTypes.pca,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
    {
      title: '详细地址',
      key: 'address',
      type: JVxeTypes.textarea,
      width:"200px",
      placeholder: '请输入${title}',
      defaultValue:'',
    },
  ]

// 高级查询数据
export const superQuerySchema = {
  avatar: {title: '头像',order: 0,view: 'image', type: 'string',},
  account: {title: '登录账号',order: 1,view: 'text', type: 'string',},
  caregiver: {title: '护理员',order: 2,view: 'sel_user', type: 'string',},
  expertName: {title: '专家姓名',order: 3,view: 'text', type: 'string',},
  membershipType: {title: ' 会员类型',order: 4,view: 'list', type: 'string',dictCode: 'membership_type',},
  memberStatus: {title: '会员状态',order: 5,view: 'list', type: 'string',dictCode: 'member_status',},
  memberName: {title: '会员姓名',order: 6,view: 'text', type: 'string',},
  memberNickname: {title: '会员昵称',order: 7,view: 'text', type: 'string',},
  idNumber: {title: '身份证号',order: 8,view: 'text', type: 'string',},
  phone: {title: '手机号码',order: 9,view: 'text', type: 'string',},
  memberGender: {title: '会员性别',order: 10,view: 'list', type: 'string',dictCode: 'sex',},
  email: {title: '电子邮箱',order: 11,view: 'text', type: 'string',},
  region: {title: '省市区',order: 12,view: 'pca', type: 'string',},
  address: {title: '详细地址',order: 13,view: 'text', type: 'string',},
  identityLabel: {title: '身份标签',order: 14,view: 'list_multi', type: 'string',dictCode: 'identity_label',},
  remarks: {title: '备注',order: 15,view: 'text', type: 'string',},
  nation: {title: '民族',order: 16,view: 'text', type: 'string',},
  placeOfOrigin: {title: ' 籍贯',order: 17,view: 'text', type: 'string',},
  politicalStatus: {title: '政治面貌',order: 18,view: 'list', type: 'string',dictCode: 'political_status',},
  educationalLevel: {title: '文化程度',order: 19,view: 'list', type: 'string',dictCode: 'educational_level',},
  personnelCategory: {title: '人员类别',order: 20,view: 'list', type: 'string',dictCode: 'personnel_category',},
  maritalStatus: {title: '婚姻状况',order: 21,view: 'list', type: 'string',dictCode: 'marital_status',},
  residentialStatus: {title: '居住状况',order: 22,view: 'list', type: 'string',dictCode: 'residential_status',},
  sourceOfIncome: {title: '经济来源',order: 23,view: 'checkbox', type: 'string',dictCode: 'source_of_income',},
  oldUnit: {title: '原单位',order: 24,view: 'text', type: 'string',},
  professionalTitle: {title: ' 职称',order: 25,view: 'text', type: 'string',},
  monthlyIncome: {title: '月收入',order: 26,view: 'text', type: 'string',},
  religiousBelief: {title: ' 宗教信仰',order: 27,view: 'list', type: 'string',dictCode: '',},
  registeredResidence: {title: '户籍所在地',order: 28,view: 'pca', type: 'string',},
  householdType: {title: '户籍类型',order: 29,view: 'list', type: 'string',dictCode: 'household_type',},
  householdAddress: {title: '户籍详细地址',order: 30,view: 'text', type: 'string',},
  residentialDetailedAddress: {title: '居住详细地址',order: 31,view: 'text', type: 'string',},
  socialSecurityNumber: {title: '社保号',order: 32,view: 'text', type: 'string',},
  medicalSecurity: {title: '医疗保障',order: 33,view: 'text', type: 'string',},
  bloodType: {title: '血型',order: 34,view: 'list', type: 'string',dictCode: 'blood_type',},
  chronicDisease: {title: '慢性病',order: 35,view: 'text', type: 'string',},
  disabilitySituation: {title: '失能情况',order: 36,view: 'list', type: 'string',dictCode: 'disability_situation',},
  serviceType: {title: '服务类型',order: 37,view: 'list', type: 'string',dictCode: 'service_type',},
  //子表高级查询
  ecEmergencyContact: {
    title: '紧急联系人（档案信息管理附表）',
    view: 'table',
    fields: {
        serviceProviderId: {title: '服务商ID',order: 0,view: 'text', type: 'string',},
        name: {title: ' 姓名',order: 1,view: 'text', type: 'string',},
        relationship: {title: '关系',order: 2,view: 'text', type: 'string',},
        phone: {title: '手机号',order: 3,view: 'text', type: 'string',},
        region: {title: '地址',order: 4,view: 'pca', type: 'string',},
        address: {title: '详细地址',order: 5,view: 'textarea', type: 'string',},
    }
  },
};
